import request from '@/config/axios'

export interface PresentConditionVO {
  id: number
  changeNumber: string
  taskNumber: string
  dictTaskType: number
  productType: string
  productNumber: string
  productName: string
  productStandard: string
  customerCode: string
  customerName: string
  dictPresentStatus: byte
  otherDescription: string
  approverOpinion: string
  approverTime: Date
  creatorName: string
  taskId: number
  dictAlertReason: number
  alertDrawingQuantity: number
  dictActualitySurvey: number
}

// 查询生产管理-工单管理-现状态填写任务单列表
export const getPresentConditionPage = async (params) => {
  return await request.get({ url: `/produce/present-condition/page`, params })
}

// 查询生产管理-工单管理-现状态填写任务单详情
export const getPresentCondition = async (id: number) => {
  return await request.get({ url: `/produce/present-condition/get?id=` + id })
}


// 修改生产管理-工单管理-现状态填写任务单
export const updatePresentCondition = async (data: PresentConditionVO) => {
  return await request.put({ url: `/produce/present-condition/saveOrSubmit`, data })
}


// 导出生产管理-工单管理-现状态填写任务单 Excel
export const exportPresentCondition = async (data) => {
  return await request.download({ url: `/produce/present-condition/export-excel`, data })
}
